<html>
<script>
/*
var a = "<test>Jerry&Tom</test>";

var result = a.replace(/[\&<>]/g, function(s) {
            switch (s) {
            case "&":
                return "&amp;";
            case "<":
                return "&lt;";
            case ">":
                return "&gt;";
            default:
                return s;
            }});
console.log(result);*/

var input = "HTTPs://localhost:8080/sap/opu/odata/sap/CRM_ODATA//DocumentNoteCollection(h…t=datetime'2015-10-23T10%3A41%3A27',textLanguageID='FR',textObjectID='A002')";

var result = input.replace(/^http.*CRM_ODATA\/+(.*)/gi, function(s) {
         return s;
     });

console.log(result);

var test = "df  /p * 3";// null
test = "df  / p * 3"; // ok
test = "df  /  p * 3"; // ok
result = test.match(/^.*\/\s+.*/);

test = "df 00   * 1000 / p  3"
result = test.match(/^[^\*].*\*.*\/\s+.*/); // commit
result = test.match(/^[^\*].*\*((?!000).)*\/\s+.*/); // null

alert("result: " + result);
</script>
</html>